Skip to main content

ReleaseRegistry.sol

Git Source

Inherits: Governance

Author: yearn.finance

Used by Yearn Governance to track on chain all releases of the V3 vaults by API Version.

State Variables​

name​

string public constant name = "Yearn V3 Release Registry";

numReleases​

uint256 public numReleases;

factories​

mapping(uint256 => address) public factories;

releaseTargets​

mapping(string => uint256) public releaseTargets;

Functions​

constructor​

constructor(address _governance) Governance(_governance);

latestFactory​

Returns the latest factory.

Throws if no releases are registered yet.

function latestFactory() external view virtual returns (address);

Returns

NameTypeDescription
<none>addressThe address of the factory for the latest release.

latestRelease​

Returns the api version of the latest release.

Throws if no releases are registered yet.

function latestRelease() external view virtual returns (string memory);

Returns

NameTypeDescription
<none>stringThe api version of the latest release.

newRelease​

Issue a new release using a deployed factory.

Stores the factory address in factories and the release target in releaseTargets with its associated API version. Throws if caller isn't governance. Throws if the api version is the same as the previous release. Emits a NewRelease event.

function newRelease(address _factory) external virtual onlyGovernance;

Parameters

NameTypeDescription
_factoryaddressThe factory that will be used create new vaults.

Events​

NewRelease​

event NewRelease(uint256 indexed releaseId, address indexed factory, string apiVersion);